-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protect migrated volume from node vm deletion #1762
protect migrated volume from node vm deletion #1762
Conversation
7446f5e
to
b510a83
Compare
5813059
to
ff8df3d
Compare
9f44694
to
fd1c431
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me.
As a follow-up we need a released version of govmomi & unit tests, which will be added later.
/approve
bea12da
to
7a6fa60
Compare
@chethanv28 I have addressed all your review comments. |
@dougm has helped create new govmomi release required for this PR. |
7a6fa60
to
98b6fea
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chethanv28, divyenpatel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
return err | ||
} | ||
// Set up the VC connection | ||
err = m.virtualCenter.ConnectVslm(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What endpoint is this code connecting to? Is this connecting to the Pandora(sps) endpoint? Pandora is removed in vSphere 8.0.
What this PR does / why we need it:
Migrated in-tree vSphere volumes does not have FCD control flag -
keepAfterDeleteVm
.After volumes are migrated to CSI and registered as FCD, if Node VM is deleted while volumes are attached to them, volumes are deleted along with it.
This is a data loss.
This PR helps add
keepAfterDeleteVm
control flag to the migrated volumes.Note: This is not happening for Volumes directly created by CSI driver, as when FCD is created, by default it gets
keepAfterDeleteVm
control flag.Testing done:
Created in-tree vSphere volume
Volume is migrated to CSI and registered as FCD
Created Pod using this volume
Control flag
keepAfterDeleteVm
is set on the migrated volumeMigration CRD is updated and protectvolumefromvmdelete is set to true.
Deleted Pod and re-created Pod.
Observed already protected log
Confirmed flag is properly set using mob
Special notes for your reviewer:
Release note: